workspace(name = "tools")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

local_repository(
    name = "tink_base",
    path = "..",
)

local_repository(
    name = "tink_cc",
    path = "../cc",
)

local_repository(
    name = "tink_java",
    path = "../java_src",
)

local_repository(
    name = "tink_go",
    path = "../go",
)

local_repository(
    name = "tink_py",
    path = "../python",
)

# Load Tink dependencies. Note that the Python dependencies have to be loaded
# first, as they rely on a newer version of rules_python.
load("@tink_py//:tink_py_deps.bzl", "tink_py_deps")
tink_py_deps()

load("@tink_py//:tink_py_deps_init.bzl", "tink_py_deps_init")
tink_py_deps_init("tink_py")

load("@tink_py_pip_deps//:requirements.bzl", tink_pip_install = "pip_install")
tink_pip_install()

load("@tink_base//:tink_base_deps.bzl", "tink_base_deps")
tink_base_deps()

load("@tink_base//:tink_base_deps_init.bzl", "tink_base_deps_init")
tink_base_deps_init()

load("@tink_cc//:tink_cc_deps.bzl", "tink_cc_deps")
tink_cc_deps()

load("@tink_cc//:tink_cc_deps_init.bzl", "tink_cc_deps_init")
tink_cc_deps_init()

load("@tink_java//:tink_java_deps.bzl", "tink_java_deps")
tink_java_deps()

load("@tink_java//:tink_java_deps_init.bzl", "tink_java_deps_init")
tink_java_deps_init()

load("@tink_go//:tink_go_deps.bzl", "tink_go_deps")
tink_go_deps()

load("@tink_go//:tink_go_deps_init.bzl", "tink_go_deps_init")
tink_go_deps_init()

# TODO(b/213404399): Remove after Gazelle issue is fixed.
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
gazelle_dependencies()
go_repository(
    name = "com_google_cloud_go_compute",
    importpath = "cloud.google.com/go/compute",
    sum = "h1:rSUBvAyVwNJ5uQCKNJFMwPtTvJkfN38b6Pvb9zZoqJ8=",
    version = "v0.1.0",
)

# Release from 2021-10-26. Needed for the pip dependencies
http_archive(
    name = "rules_python",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.5.0/rules_python-0.5.0.tar.gz",
    sha256 = "cd6730ed53a002c56ce4e2f396ba3b3be262fd7cb68339f0377a45e8227fe332",
)

load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
load("@rules_python//python:pip.bzl", "pip_repositories", "pip3_import")
pip_repositories()
pip3_import(
   name = "pip_deps",
   requirements = "//:requirements.txt",
)

load("@pip_deps//:requirements.bzl", "pip_install")
pip_install()
